package com.augurit.gzcgwsp.state.web;

import java.util.Map;

import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springside.modules.orm.Page;
import org.springside.modules.web.struts2.Struts2Utils;

import com.augurit.common.base.action.CrudActionSupport;
import com.augurit.common.util.ExtUtils;
import com.augurit.common.util.lang.DateUtils;
import com.augurit.gzcgwsp.state.service.IYwZhengwuNotBjService;
import com.augurit.gzcgwsp.state.util.RequestUtil;
import com.augurit.gzcgwsp.wfex.bi.web.form.WfBusInstanceFormEX;

/**
 * 还没有产生办结环节的案件（交换到政务办）
 * @author adm
 *
 */
@SuppressWarnings("serial")
@Results( {
		@Result(name = CrudActionSupport.RELOAD, location = "yw-zhengwu-not-bj.action", type = "redirect"),
		@Result(name = "toList", location = "/gzcgwsp/state/ywZhengwuNotBj/listYwZhengwuNotBj.jsp")
})
public class YwZhengwuNotBjAction extends
		CrudActionSupport<WfBusInstanceFormEX> {

	private WfBusInstanceFormEX form;
	private Long id;
	private Page<WfBusInstanceFormEX> page;
	@Autowired
	private IYwZhengwuNotBjService ywZhengwuNotBjService;

	@Override
	public String delete() throws Exception {
		return null;
	}
	/**
	 * 查询数据列表
	 * 
	 * @return
	 * @throws Exception
	 */
	public String getData() throws Exception {
		Map map = RequestUtil.getMapByRequest(getRequest());
		
		if (page == null) {
			page = new Page(25);
		}
		ExtUtils.initPageFromExtGridParam(getRequest(), page);
		page = ywZhengwuNotBjService.searchPage(page, map);
		renderText(Struts2Utils.getJsonString(page,
				DateUtils.YYYY_MM_DD_HH_MM_SS));
		return null;
	}
	@Override
	public String deleteMore() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String list() throws Exception {

		return "toList";
	}

	@Override
	public String input() throws Exception {

		return INPUT;
	}

	@Override
	protected void prepareModel() throws Exception {
//		if (id != null) {
//			form = ywWebserviceInfoService.get(id);
//		} else
//			form = new WfBusInstanceFormEX();
	}

	@Override
	public String save() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public WfBusInstanceFormEX getModel() {
		return form;
	}

	public Page<WfBusInstanceFormEX> getPage() {
		return page;
	}

	public void setPage(Page<WfBusInstanceFormEX> page) {
		this.page = page;
	}

	public WfBusInstanceFormEX getForm() {
		return form;
	}

	public void setForm(WfBusInstanceFormEX form) {
		this.form = form;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
}
